<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class option</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="ODTONE 0.4">
<link rel="up" href="../../../odtone_net_library.html#header..home.carlos.Projectos.odtone.inc.odtone.net.ip.options_hpp" title="Header &lt;/home/carlos/Projectos/odtone/inc/odtone/net/ip/options.hpp&gt;">
<link rel="prev" href="opt_rdns.html" title="Class opt_rdns">
<link rel="next" href="prefix_v6.html" title="Class prefix_v6">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="'ODTONE - Open Dot Twenty One'" width="100" height="100" src="../../.././images/logo.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="opt_rdns.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../odtone_net_library.html#header..home.carlos.Projectos.odtone.inc.odtone.net.ip.options_hpp"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="prefix_v6.html"><img src="../../../images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="odtone.net.ip.option"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class option</span></h2>
<p>odtone::net::ip::option</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../odtone_net_library.html#header..home.carlos.Projectos.odtone.inc.odtone.net.ip.options_hpp" title="Header &lt;/home/carlos/Projectos/odtone/inc/odtone/net/ip/options.hpp&gt;">/home/carlos/Projectos/odtone/inc/odtone/net/ip/options.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="option.html" title="Class option">option</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// <a class="link" href="option.html#odtone.net.ip.optionconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="option.html#idp5054872-bb"><span class="identifier">option</span></a><span class="special">(</span><span class="identifier">uint8</span><span class="special">,</span> <span class="identifier">uint8</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="option.html#idp5046848-bb">public static functions</a></span>
  <span class="keyword">static</span> <a class="link" href="option.html" title="Class option">option</a> <span class="special">*</span> <a class="link" href="option.html#idp5047032-bb"><span class="identifier">cast</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">static</span> <span class="identifier">T</span> <span class="special">*</span> <a class="link" href="option.html#idp5049496-bb"><span class="identifier">cast</span></a><span class="special">(</span><a class="link" href="option.html" title="Class option">option</a> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">uint8</span> <a class="link" href="option.html#idp5051520-bb"><span class="identifier">type</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="option.html" title="Class option">option</a> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">size_t</span> <a class="link" href="option.html#idp5053104-bb"><span class="identifier">size</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="option.html" title="Class option">option</a> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idp20956928"></a><h2>Description</h2>
<p>This class represents the base IPv6 Options. </p>
<div class="refsect2">
<a name="idp20957320"></a><h3>
<a name="odtone.net.ip.optionconstruct-copy-destruct"></a><code class="computeroutput">option</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><a name="idp5054872-bb"></a><span class="identifier">option</span><span class="special">(</span><span class="identifier">uint8</span> type<span class="special">,</span> <span class="identifier">uint8</span> length<span class="special">)</span><span class="special">;</span></pre>
<p>Construct an IPv6 Options.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">length</code></span></p></td>
<td><p>The IPv6 Options length. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">type</code></span></p></td>
<td><p>The IPv6 Options type. </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li></ol></div>
</div>
<div class="refsect2">
<a name="idp20963784"></a><h3>
<a name="idp5046848-bb"></a><code class="computeroutput">option</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <a class="link" href="option.html" title="Class option">option</a> <span class="special">*</span> <a name="idp5047032-bb"></a><span class="identifier">cast</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> data<span class="special">,</span> <span class="identifier">size_t</span> len<span class="special">)</span><span class="special">;</span></pre>
<p>Convert a byte buffer to an IPv6 Options.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">data</code></span></p></td>
<td><p>The byte buffer. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">len</code></span></p></td>
<td><p>The size of the byte buffer. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The pointer of the returning IPv6 Options. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">static</span> <span class="identifier">T</span> <span class="special">*</span> <a name="idp5049496-bb"></a><span class="identifier">cast</span><span class="special">(</span><a class="link" href="option.html" title="Class option">option</a> <span class="special">*</span> opt<span class="special">)</span><span class="special">;</span></pre>
<p>Convert an IPv6 Options to an template class.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The pointer of the returning class. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">uint8</span> <a name="idp5051520-bb"></a><span class="identifier">type</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="option.html" title="Class option">option</a> <span class="special">*</span> opt<span class="special">)</span><span class="special">;</span></pre>
<p>Get the IPv6 Options type.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The IPv6 Options type. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">size_t</span> <a name="idp5053104-bb"></a><span class="identifier">size</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="option.html" title="Class option">option</a> <span class="special">*</span> opt<span class="special">)</span><span class="special">;</span></pre>
<p>Get the IPv6 Options size.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The IPv6 Options size. </p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2012 Universidade
      Aveiro<br>Copyright &#169; 2009-2012 Instituto
      de Telecomunica&#231;&#245;es - P&#243;lo Aveiro<p>
        This software is distributed under a license. The full license agreement
        can be found in the LICENSE in this distribution. This software may not be
        copied, modified, sold or distributed other than expressed in the named license
        agreement. This software is distributed without any warranty.
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="opt_rdns.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../odtone_net_library.html#header..home.carlos.Projectos.odtone.inc.odtone.net.ip.options_hpp"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="prefix_v6.html"><img src="../../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
